<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=1000, initial-scale=1.0, maximum-scale=1.0">
	    <!-- Loading Bootstrap -->
	    <link href="./Public/Admin/Flat/dist/css/vendor/bootstrap.min.css" rel="stylesheet">
	    <!-- Loading Flat UI -->
	    <link href="./Public/Admin/Flat/dist/css/flat-ui.css" rel="stylesheet">
	    <link href="./Public/Admin/Flat/docs/assets/css/demo.css" rel="stylesheet">
	    <link rel="shortcut icon" href="./Public/Admin/Flat/img/favicon.ico">
	    <!-- HTML5 shim, for IE6-8 support of HTML5 elements. All other JS at the end of file. -->
	    <!--[if lt IE 9]>
	      <script src="dist/js/vendor/html5shiv.js"></script>
	      <script src="dist/js/vendor/respond.min.js"></script>
	    <![endif]-->
	</head>
	<body>
	    <form action="" method="post" enctype="multipart/form-data">
		<div class="alert alert-success">修改品牌</div>
		<div class="form-group" style="overflow: hidden;">
           <label for="inputEmail3" class="col-sm-2 control-label">品牌名称</label>
           <div class="col-sm-10">
             <input type="text" class="form-control" name="bname" value="{{$oldData['bname']}}" placeholder="属性名称">
           </div>
        </div> 
        <script src="Public/Home/js/jquery-1.8.2.min.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			$(function(){
				//点击关闭图片按钮
				$('.close_img').click(function(){
					//删除图片元素
					var str = '<label for="exampleInputEmail1">缩略图</label><input id="exampleInputEmail1" type="file" name="blogo">';
					$('#upload_box').html(str);
				})
			})
		</script>
        <div class="form-group" style="overflow: hidden;">
           <label for="inputEmail3" class="col-sm-2 control-label">是否热门 </label>
             <div class="col-sm-10">
             	<!--判断热门为0时，默认为0，否则为1 checked="checked"-->
             {{if value="$oldData['bhot']==0"}}
           	 <input id="exampleInputEmail1"  type="radio" name="bhot"  value="1">是
           	 <input id="exampleInputEmail1"  type="radio" name="bhot" checked="checked" value="0">否
           	 {{else}}
           	 <input id="exampleInputEmail1"  type="radio" name="bhot" checked="checked" value="1">是
           	 <input id="exampleInputEmail1"  type="radio" name="bhot" value="0">否
           	 {{endif}}
           </div>
        </div>
       <div class="form-group" id='upload_box'>
			<!--如果有缩略图的时候-->
			{{if value="$oldData['blogo']"}}
				<img src="{{$oldData['blogo']}}" width="200"/>
				<a href="javascript:;" class="close_img">X</a>
				<input type="hidden" name="blogo" value="{{$oldData['blogo']}}"/>
			{{else}}
			<!--没有缩略图的时候添加-->
				<label for="exampleInputEmail1">缩略图</label>
				<input id="exampleInputEmail1" type="file" name="blogo">
		    {{endif}}
		</div>
		<div class="form-group" style="margin-bottom: 100px;">
           <label for="inputEmail3" class="col-sm-2 control-label">排序</label>
           <div class="col-sm-10">
             <input type="text" class="form-control" name="bsort" value="{{$oldData['bsort']}}"  placeholder="">
           </div>
        </div> 
        <input type="hidden" name="bid" value="{{$oldData['bid']}}"/>
		<button class="btn btn-primary btn-block" type="submit" > 确定 </button>
		</form>
	</body>
</html>
